#ifndef INFOCOLLECTIONBASE_H
#define INFOCOLLECTIONBASE_H

#include <QObject>
#include <QObject>
#include <QString>
#include <QFile>
#include <QDebug>

class InfoCollectionBase:public QObject
{
    Q_OBJECT
public:
    InfoCollectionBase(QObject *parent=nullptr);
protected:
    /**
     * @brief 通过Popen命令获得多条结果
     *
     * @param shellCmd shell命令
     * @param result 查询结果
     */
    void getOnePopenResult(const QString &shellCmd, QString &result);
    /**
     * @brief 通过Popen命令获得一条结果
     *
     * @param shellCmd shell命令
     * @param result 查询结果
     */
    void getPopenResult(const QString &shellCmd, QList<QString> &result);
    /**
     * @brief 最大字符串长度
     *
     */
    static constexpr int32_t s_maxStrLen = 1024;
    /**
     * @brief 分隔符
     *
     */
    static constexpr const char* s_separator = "; ";
private:
};

#endif // INFOCOLLECTIONBASE_H
